import fs from "fs";

export function createProject(name) {
  const newPro = {
    area: "",
    name: name,
    construction: "",
    content: "",
    tags: [],
    investment: 0,
    funds: [
      {
        type: "",
        name: "",
        amount: 0,
        doc: {
          name: "",
          code: "",
          date: "",
        },
        forward_doc: {
          name: "",
          code: "",
          date: "",
        },
      },
    ],
    approval_doc: {
      name: "",
      code: "",
      date: "",
    },
    department: "",
  };

  fs.writeFileSync(
    `./src/project.json`,
    JSON.stringify(newPro, null, 2)
  );

  // insertProject(newPro);
}
